package com.zyh.day05.operator

import org.apache.spark.sql.{DataFrame, SparkSession}

object HiveTest {
  def main(args: Array[String]): Unit = {
    val spark: SparkSession = SparkSession.builder()
      .appName("ht")
      .master("local[*]")
      .enableHiveSupport()
      .getOrCreate()

    spark.sql("show databases").show()
    spark.sql("use baizhi").show()
    spark.sql("show tables").show()
    spark.sql("desc t_employees").show()
    spark.sql("select * from t_employees").show()
    spark.close()
  }
}
